The AT+CFUN command serves to control the functionality level of the ME. It can be used to reset the ME, to choose one of the SLEEP modes or to return to full functionality.
Intended for power saving, SLEEP mode reduces the functionality of the ME to a minimum and thus minimizes the current consumption. Further information, particularly power supply ratings during the various operating modes and the timing of hardware signals in SLEEP mode can be found in the
"TC65 Hardware Interface Description, Version 03.000".
SLEEP mode falls in two categories:
NON-CYCLIC SLEEP mode permanently blocks the serial interface. The benefit of the CYCLIC SLEEP mode is that the serial interface remains accessible and that, in intermittent wake-up periods, characters can be sent or received without terminating the selected mode. This allows the ME to wake up for the duration of an event and, afterwards, to resume power saving. Please refer to Section
2.9.1, Wake up the ME from SLEEP mode for a summary of all SLEEP modes and the different ways of waking up the module.
For CYCLIC SLEEP mode both the ME and the application must be configured to use hardware flow control. This is necessary since the CTS signal is set/reset every 0.9-2.7 seconds in order to indicate to the application when the UART is active. The default setting of hardware flow control is
AT\Q0 which must be altered to
AT\Q3. For use after restart you are advised to add it to the user profile saved with
AT&W.
If both interfaces ASC0 and ASC1 are connected, hardware flow control must be set in either application. See notes below for further detail.
SLEEP mode management if Java is started: The Java Virtual Machine remains active, but also enters the SLEEP mode. AT commands can be sent from the Java application to the serial interface, no matter which SLEEP mode was selected. This allows you to control the ME even if it is in NON-CYCLIC SLEEP mode.
The
AT+CFUN test command returns the values of the supported parameters.
The
AT+CFUN read command returns the current functionality value.
The
AT+CFUN write command can be used to reset the ME, to choose one of the SLEEP modes or to return to full functionality.
NON-CYCLIC SLEEP mode: In this mode, the AT interface is not accessible. Consequently, after setting
<fun>=0, do not send further characters. Otherwise these characters remain in the input buffer and may delay the output of an unsolicited result code.
Due to the fact that the serial interface is disabled, this mode cannot be used if a Remote SIM Access (RSA) connection is ongoing (reason: during RSA connections the SIM communication is routed via a serial channel).
The first wake-up event stops power saving and takes the ME back to full functionality level
<fun>=1.
Full functionality (no power saving). If the ME is in one of the CYCLIC SLEEP modes you can issue AT+CFUN=1 to stop power saving and return to full functionality. If the ME is NON-CYCLIC SLEEP mode,
<fun>=1 can also be sent by the Java application.
Keep in mind that, unlike the reset command described below, this action does not restart the ME but only changes the level of functionality. See parameter
<rst> for details on the reset.
CYCLIC SLEEP mode: In this mode, the serial interface is shortly enabled while CTS is active. If characters are recognized on the serial interface, the ME stays active for 2 seconds after the last character was sent or received.
The ME exits SLEEP mode only, if
AT+CFUN=1 is entered.
CYCLIC SLEEP mode: In this mode, the serial interface is shortly enabled while CTS is active. If characters are recognized on the serial interface, the ME stays active after the last character was sent or received for at least the time, which can be configured by
AT^SCFG="PowerSaver/Mode9/Timeout",
<psm9to> (temporary wakeup).
In contrast to SLEEP mode 7 assertion of RTS can also be used to temporarily wake up the ME. In this case too, activity time is at least the time set with
AT^SCFG="PowerSaver/Mode9/Timeout",
<psm9to>. RTS can be activated either from ASC0 or ASC1.
The ME exits SLEEP mode only, if
AT+CFUN=1 is entered.
|
•
|
CYCLIC SLEEP mode cannot be activated or resumed as long as data are buffered in one of the output buffers of the ME (ASC0 or ASC1). This should be taken into account, because RTS may be unintentionally asserted if, for example, one of the following scenarios occurs: a) Hardware flow control is set in the ME ( AT\Q3), but not in the host application (RTS/CTS handshake). b) The two serial interfaces ASC0 and ASC1 are connected, but one of them is released, e.g. after closing or deactivating the application connected to this interface. In cases a) and b) data sent by the ME, such as URCs or outstanding AT command responses, will be buffered in the output buffer of this interface, signalized by the active RTS line until the buffer is emptied. Therefore, for CYCLIC SLEEP mode to work properly take care that the following requirements be met: Be sure that data sent by the ME are collected on both interfaces. Activate hardware flow control on ME (TA) and application side (TE). Avoid releasing one of the interfaces if any URCs are likely to occur on this interface.
|
|
•
|
CYCLIC SLEEP mode cannot be activated or resumed as long as data is buffered in one of the output buffers of the ME (ASC0 or ASC1). Therefore, ensure that the following requirements be met: a) If hardware flow control is set in the ME ( AT\Q3), the host must also use hardware flow control. b) Remember that AT\Q3 takes effect only on the interface where the command was set. Therefore, if both interfaces ASC0 and ASC1 are connected ensure to set AT\Q3 on each interface. However, if only one interface shall be operated ensure that, on the unused interface, AT\Q3 is neither enabled and nor stored to the AT&W user profile. This is necessary to avoid that URCs, outstanding AT command responses or, after restart even the " ^SYSSTART" URC might be buffered on the unused interface without being collected by the host application.
|